package com.ejd.web.vo.customer;

import java.io.Serializable;


import java.util.ArrayList;
import java.util.List;

import javax.faces.application.FacesMessage;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.event.ValueChangeEvent;
import com.ejd.controller.LoginController;
import com.ejd.service.ICouponService;
import com.ejd.utils.DESPlusUtil;
import com.ejd.utils.DateTimeUtil;
import com.ejd.utils.MessageFactory;
import com.ejd.utils.PageExistUtil;
import com.ejd.utils.SpringFacesUtil;
import com.ejd.web.bo.impl.Consultation;
import com.ejd.web.bo.impl.Coupon;
import com.ejd.web.bo.impl.Order;
import com.ejd.web.constant.EjdConstants;
import com.ejd.web.constant.ManageBeanConstants;
import com.ejd.web.constant.SpringBeanConstants;
import com.ejd.web.vo.common.ConsultationPage;
import com.ejd.web.vo.common.CouponPage;
import com.ejd.web.vo.common.OrderPage;

@ManagedBean(name="customerCenterPage")
@SessionScoped
public class CustomerCenterPageBean implements Serializable {
	private static final long serialVersionUID = -8106629465344224986L;
	
	private OrderPage nPage;// new order page status is open
	
	public CustomerCenterPageBean(){
		this.setnPage(new OrderPage(1,10,new Order()));
	}

	public OrderPage getnPage() {
		return nPage;
	}

	public void setnPage(OrderPage nPage) {
		this.nPage = nPage;
	}
	
	
	public String selectnPageNo() {
		String result = null;
		String pageNo = (String) SpringFacesUtil.getRequestParameter("pageNo");
		if (this.getnPage().getPageNo().intValue() == Integer.valueOf(pageNo).intValue()) {
			return result;
		}
		this.getnPage().setPageNo(Integer.valueOf(pageNo).intValue());
		this.getnPage().getPageDatas();
		return result;	
	}
	
}
